/*
 * Copyright© 2003-2019 浙江汇信科技有限公司, All Rights Reserved.
 */
package com.icinfo.cloud.provider.common.controller;

import com.icinfo.cloud.provider.common.model.SysPrintVersion;
import com.icinfo.cloud.provider.common.service.ISysPrintVersionService;
import com.icinfo.framework.common.web.Result;
import com.icinfo.framework.core.web.BaseController;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 描述:  sys_print_version 对应的Controller类.<br>
 *
 * @author framework generator
 * @date 2023年11月17日
 */
@RestController
@RequestMapping("/printVersion")
public class SysPrintVersionController extends BaseController {
    /**
     * 日志记录器
     */
    private static final Logger logger = LoggerFactory.getLogger(SysPrintVersionController.class);

    @Autowired
    private ISysPrintVersionService sysPrintVersionService;


    /**
     * 查询数据
     *
     * @return
     */
    @PostMapping("/getCurrentVersion")
    public Result<SysPrintVersion> getData(@RequestBody SysPrintVersion sysPrintVersion) {
        return Result.success(sysPrintVersionService.getCurrentVersion(sysPrintVersion.getAppId(), sysPrintVersion.getType()));
    }
}